<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div id="app">
    <home></home>
  </div>
<!--   <script id="tpl" type="text/html">
    <div>
      <h2>父组件</h2>
      
    </div>
  </script> -->
  <template id="tpl" type="text/html">
    <div>
      <h2>父组件</h2>
    </div>
  </template>
  <script src="./vue.js"></script>
  <script>
    // 定义父组件
    const Home = {
      template: "#tpl"
    }

    Vue.component('Home', Home);
    const vm = new Vue({
      // vm功能将vue语法渲染到 视图
      el: '#app'
    })
  </script>
</body>

</html>